#include<stdio.h>

int a[100] = {0};

int main()
{
	freopen("zz_test\\test3.in", "r", stdin);
	freopen("zz_test\\test3.out", "w", stdout);
    
	int n=0;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    for ( int i = 0; i < n - 1; i++ ) 
	{
    	for ( int j = i + 1; j < n; j++ ) 
		{
    		printf("%d %d\n", a[i], a[j]);
    	}
    }
    return 0;
}


